import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import IndexLayout from '../layout/IndexLayout'
import Index from '../views/index/Index'
// import Indexxx from '../views/index/components/List'


Vue.use(VueRouter)

  const routes = [
  { path: '/',
  redirect: '/index'
},
   {path: '/index',
   
   component: IndexLayout,
    children:[{
      path: '',
      component: Index
    },{
      path:"more/:title/:type",
      name:"moreMusic",
      component: () => import('../views/index/MusicMore.vue')
    },{
      path:"bill",
      // name:"moreMusic",
      component: () => import('../views/bill/Bill.vue')
    },
    {
      path:"singer",
      // name:"moreMusic",
      component: () => import('../views/singer/Singer.vue')
    }, {
      path:'singermsg/:id',
      component: () => import('../views/singer/SingerMsg')
    }, {
      path:'billmsg/:id',
      component: () => import( '../views/bill/BillMsg.vue')
    }

  ]
  },{
    path:'/detail/:id',
    component: () => import( '../views/Music-detail/MusicDetail.vue')
  },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
